package com.hackordie.commons.authorities;

import java.util.Calendar;
import java.util.Date;

public class User extends AEntity {

	private int idUser;
	private String userName;
	private String userPassword;
	private String email;
	private Date signinDate;
	private boolean enabled;
	private String activationCode;

	public User() {
		super();
	}

	public User(String userName, String userPassword, String email) {
		super();
		this.userName = userName;
		this.userPassword = userPassword;
		this.email = email;
		this.signinDate = Calendar.getInstance().getTime();
		this.enabled = false;
		this.activationCode = "1";
	}

	public int getIdUser() {
		return idUser;
	}

	public void setIdUser(int idUser) {
		this.idUser = idUser;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getUserPassword() {
		return userPassword;
	}

	public void setUserPassword(String userPassword) {
		this.userPassword = userPassword;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public Date getSigninDate() {
		return signinDate;
	}

	public void setSigninDate(Date signinDate) {
		this.signinDate = signinDate;
	}

	public boolean isEnabled() {
		return enabled;
	}

	public void setEnabled(boolean enabled) {
		this.enabled = enabled;
	}

	public String getActivationCode() {
		return activationCode;
	}

	public void setActivationCode(String activationCode) {
		this.activationCode = activationCode;
	}

	public Object[] toArray() {
		return new Object[] { idUser, userName, userPassword, email, signinDate, enabled, activationCode };
	}
}
